package com.suhuamo;

import com.suhuamo.mybatis.Param;
import com.suhuamo.mybatis.Select;

import java.util.List;

/**
 * @author yuanchuncheng
 * @slogan 不待春风慢，我以明月宴群山。
 * @date 2023-10-31
 * @description 学生实体类查询数据接口
 */
public interface StudentMapper {

    // 创建mapper和查询sql语句注解、接口
    @Select("select * from student where age = #{age} and name = #{name}")
    List<Student> getStudentListByAge(@Param("name") String name, @Param("age") Integer age);

    @Select("select * from student where id = #{id}")
    Student getStudentById(@Param("id") Integer id);
}
